﻿<%@ page import="com.cai.dao.LogDao" %>
<%@ page import="com.cai.dao.impl.LogDaoImpl" %>
<%@ page import="java.util.List" %>
<%@ page import="com.cai.entity.LogItem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    LogDao logDao = new LogDaoImpl();
    List<LogItem> logItems = logDao.listLogItems();
    request.setAttribute("logItems",logItems);
%>
<head>
    <title>日志管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="style/adminStyle.css" rel="stylesheet" type="text/css"/>
    <script src="js/jquery.js"></script>
    <script src="js/public.js"></script>
</head>
<body>
<div class="wrap">
    <div class="page-title">
        <span class="modular fl"><i class="order"></i><em>日志列表</em></span>
    </div>
    <div class="operate">
        <form>
            <img src="images/icon_search.gif"/>
            <input type="text" class="textBox length-long" placeholder="输入订单编号或收件人姓名..."/>
            <select class="inline-select">
                <option hidden disabled selected>选择类型</option>
                <option>借出</option>
                <option>归还</option>
            </select>
            <input type="button" value="查询" class="tdBtn"/>
        </form>
    </div>
    <table class="list-style Interlaced">
        <tr>
            <th>序号</th>
            <th>日志编号</th>
            <th>用户</th>
            <th>电子邮件</th>
            <th>用户类型</th>
            <th>物品</th>
            <th>借出时间</th>
            <th>借出数量</th>
            <th>归还时间</th>
            <th>归还状态</th>
            <th>日志状态</th>
            <th>操作</th>
        </tr>
        <c:forEach var="log" items="${requestScope.logItems}" varStatus="status">
            <tr>
                <td class="center">
                    <input type="checkbox"/>
                    <a>${status.count}</a>
                </td>
                <td class="center">
                    <span class="block">${log.log_id}</span>
                </td>
                <td class="center">
                    <span class="block">${log.user_name}</span>
                </td>
                <td class="center">
                    <span class="block">${log.user_email}</span>
                </td>
                <td class="center">
                    <span class="block">${log.user_type}</span>
                </td>
                <td class="center">
                    <span class="block">${log.item_name}</span>
                </td>
                <td class="center">
                    <span class="block">${log.log_sendTime}</span>
                </td>
                <td class="center">
                    <span class="block">${log.log_send_num}</span>
                </td>
                <td class="center">
                    <span>${log.log_returnTime}</span>
                </td>
                <td class="center">
                    <span>${log.log_return_num}</span>
                </td>
                <td class="center">
                    <span>${log.log_status}</span>
                </td>
                <td class="center">
                    <a title="编辑" id="log_update"><img src="images/icon_edit.gif"/></a>
                </td>
            </tr>
        </c:forEach>
    </table>
    <!-- BatchOperation -->
    <div style="overflow:hidden;">
        <!-- Operation -->
        <div class="BatchOperation fl">
            <input type="checkbox" id="del"/>
            <label for="del" class="btnStyle middle">全选</label>
            <input type="button" value="打印订单" class="btnStyle"/>
        </div>
        <!-- turn page -->
        <div class="turnPage center fr">
            <a>第一页</a>
            <a>1</a>
            <a>最后一页</a>
        </div>
    </div>
</div>
</body>
</html>